<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <h3>电脑价格</h3>
        <p>{{ price | addPriceUnit | addPriceIcon }}</p>
    </div>
    <script>
        Vue.filter("addPriceIcon", (value) => {
            return "￥" + value
        })
        new Vue({
            el: "#app",
            data: {
                price: 200
            },
            filters: {
                addPriceUnit(value) {
                    return "人民币" + value
                }
            }
        })
    </script>
</body>
</html>